﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VRacer.Exceptions
{
    /// <summary>
    /// Wyjatek zglaszany gdy nie mozna otworzyc folderu zawierajacego trasy (np nie istnieje lub brak dostepu)
    /// </summary>
    public class CannotReadTracksException : UIException, IVRacerException
    {
        public CannotReadTracksException(Exception innerException)
            : this("This application can't find its tracks. Check if folder with them is in place.", innerException)
        {

        }

        public CannotReadTracksException(string message, Exception innerException)
            : base(message, innerException)
        {
            Title = "Cannot find Tracks!";
            Code = 1;
            Details = "Vector Racer uses folder 'Tracks' to store its tracks. This message means that this application can't access files placed in that folder. It is possible that this folder was accidentally moved, otherwise you might need to reinstall this game.";
        }

        #region IVRacerException Members

        public bool Critical
        {
            get { return true; }
        }

        #endregion
    }
}
